/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entidades.EntidadesAutores;

import java.io.Serializable;
import javax.persistence.*;
import javax.validation.constraints.NotNull;

/**
 *
 * @author LUIGI
 */
@Entity
@Table(name = "articulotemas")
@NamedQueries({
    @NamedQuery(name = "Articulotemas.findAll", query = "SELECT a FROM Articulotemas a"),
    @NamedQuery(name = "Articulotemas.findByIdArticuloTemas", query = "SELECT a FROM Articulotemas a WHERE a.idArticuloTemas = :idArticuloTemas"),
    @NamedQuery(name = "Articulotemas.findByIdArticulo", query = "SELECT a FROM Articulotemas a WHERE a.idArticulo = :idArticulo"),
    @NamedQuery(name = "Articulotemas.findByIdTema", query = "SELECT a FROM Articulotemas a WHERE a.idTema = :idTema")})
public class Articulotemas implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "IdArticuloTemas")
    private Integer idArticuloTemas;
    @Basic(optional = false)
    @NotNull
    @Column(name = "IdArticulo")
    private int idArticulo;
    @Basic(optional = false)
    @NotNull
    @Column(name = "IdTema")
    private int idTema;

    public Articulotemas() {
    }

    public Articulotemas(Integer idArticuloTemas) {
        this.idArticuloTemas = idArticuloTemas;
    }

    public Articulotemas(Integer idArticuloTemas, int idArticulo, int idTema) {
        this.idArticuloTemas = idArticuloTemas;
        this.idArticulo = idArticulo;
        this.idTema = idTema;
    }

    public Integer getIdArticuloTemas() {
        return idArticuloTemas;
    }

    public void setIdArticuloTemas(Integer idArticuloTemas) {
        this.idArticuloTemas = idArticuloTemas;
    }

    public int getIdArticulo() {
        return idArticulo;
    }

    public void setIdArticulo(int idArticulo) {
        this.idArticulo = idArticulo;
    }

    public int getIdTema() {
        return idTema;
    }

    public void setIdTema(int idTema) {
        this.idTema = idTema;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idArticuloTemas != null ? idArticuloTemas.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Articulotemas)) {
            return false;
        }
        Articulotemas other = (Articulotemas) object;
        if ((this.idArticuloTemas == null && other.idArticuloTemas != null) || (this.idArticuloTemas != null && !this.idArticuloTemas.equals(other.idArticuloTemas))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entidades.EntidadesAutores.Articulotemas[ idArticuloTemas=" + idArticuloTemas + " ]";
    }
    
}
